Optimal. Leaf size=24 \[ a^2 \log (x)-\frac{2 a b}{x}-\frac{b^2}{2 x^2} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0350903, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154 \[ a^2 \log (x)-\frac{2 a b}{x}-\frac{b^2}{2 x^2} \]
Antiderivative was successfully verified.
[In] Int[(a + b/x)^2/x,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 6.38225, size = 20, normalized size = 0.83 \[ a^{2} \log{\left (x \right )} - \frac{2 a b}{x} - \frac{b^{2}}{2 x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((a+b/x)**2/x,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.00620191, size = 24, normalized size = 1. \[ a^2 \log (x)-\frac{2 a b}{x}-\frac{b^2}{2 x^2} \]
Antiderivative was successfully verified.
[In] Integrate[(a + b/x)^2/x,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.008, size = 23, normalized size = 1. \[ -{\frac{{b}^{2}}{2\,{x}^{2}}}-2\,{\frac{ab}{x}}+{a}^{2}\ln \left ( x \right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((a+b/x)^2/x,x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 1.43652, size = 28, normalized size = 1.17 \[ a^{2} \log \left (x\right ) - \frac{4 \, a b x + b^{2}}{2 \, x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a + b/x)^2/x,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.228346, size = 35, normalized size = 1.46 \[ \frac{2 \, a^{2} x^{2} \log \left (x\right ) - 4 \, a b x - b^{2}}{2 \, x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a + b/x)^2/x,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 1.19741, size = 20, normalized size = 0.83 \[ a^{2} \log{\left (x \right )} - \frac{4 a b x + b^{2}}{2 x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a+b/x)**2/x,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.225109, size = 30, normalized size = 1.25 \[ a^{2}{\rm ln}\left ({\left | x \right |}\right ) - \frac{4 \, a b x + b^{2}}{2 \, x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((a + b/x)^2/x,x, algorithm="giac")
[Out]